package com.zmn.mcc.dubbo.interfaces.role;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.common.dto2.data.LayuiTableDO;
import com.zmn.mcc.common.dto.cc.CCRoleDRO;
import com.zmn.mcc.common.dto.cc.CCRolePermitDRO;
import com.zmn.mcc.common.dto.cc.CCRoleStaffDRO;
import com.zmn.mcc.common.dto.cc.UpdateQuery;
import com.zmn.mcc.common.dto.role.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author tanbiao
 * @description
 * @modifier
 * @since 2020/7/3 16:11
 **/
public interface RoleListRemoteService {
    /**
     * 取得指定员工信息对象
     *
     * @param roleDIO 角色信息
     * @return
     */
    ResponseDTO<List<RoleDRO>> listByDIO(RoleDIO roleDIO);

    ResponseDTO<List<RoleDRO>> listByIds(List<Integer> ids);

    /**
     * 描述: 根据部门id集合查询角色基础信息
     *
     * @param deptIds 部门id集合
     * @return ResponseDTO<List < RoleBaseDRO>>
     * @author xujie
     * @since 2021/04/26
     **/
    @ApiOperation(value = "根据部门id集合查询角色id、角色名称", notes = "返回角色id、角色名称", response = RoleBaseDRO.class)
    ResponseDTO<List<RoleBaseDRO>> listByDeptIds(@ApiParam(value = "部门id集合", required = true)
                                                 @NotNull(message = "部门id集合不能为空")
                                                 @Size(message = "部门id集合", min = 1, max = 500) List<Integer> deptIds);

    /**
     * 描述: 分页搜索角色基础信息
     *
     * @param dio 角色搜索分页请求参数
     * @return ResponseDTO<LayuiTableDO < RoleBaseDRO>>
     * @author xujie
     * @since 2021/04/27
     **/
    @ApiOperation(value = "分页搜索角色基础信息", notes = "返回角色id、角色名称", response = RoleBaseDRO.class)
    ResponseDTO<LayuiTableDO<RoleBaseDRO>> listByPageSearch(@ApiParam(value = "角色搜索分页请求参数", required = true)
                                                            @NotNull(message = "角色搜索分页请求参数为空") RoleSearchDIO dio);

    /**
     * 根据更新时间获取角色信息
     *
     * @param query
     * @return ResponseDTO<List < CCBaseAreaDro>>
     */
    @ApiOperation(value = "根据更新时间获取角色信息", response = ResponseDTO.class)
    ResponseDTO<List<CCRoleDRO>> listRoleByUpdateTime(@ApiParam(value = "查询条件", required = false) UpdateQuery query);

    /**
     * 根据更新时间获取角色权限关系
     *
     * @param pageSize  每页条数
     * @param pageIndex 页码
     * @return ResponseDTO<List < CCRoleDRO>>
     */
    @ApiOperation(value = "根据更新时间获取角色权限关系", response = ResponseDTO.class)
    ResponseDTO<List<CCRolePermitDRO>> listRolePermitByUpdateTime(@ApiParam(value = "每页条数", required = false)
                                                                  @NotNull(message = "每页条数不能为空") Integer pageSize,
                                                                  @ApiParam(value = "页码", required = false)
                                                                  @NotNull(message = "页码不能为空") Integer pageIndex);

    /**
     * 根据更新时间获取角色员工关系
     *
     * @param pageSize  每页条数
     * @param pageIndex 页码
     * @return ResponseDTO<List < CCRoleDRO>>
     */
    @ApiOperation(value = "根据更新时间获取角色员工关系", response = ResponseDTO.class)
    ResponseDTO<List<CCRoleStaffDRO>> listRoleStaffByUpdateTime(@ApiParam(value = "每页条数", required = false)
                                                                @NotNull(message = "每页条数不能为空") Integer pageSize,
                                                                @ApiParam(value = "页码", required = false)
                                                                @NotNull(message = "页码不能为空") Integer pageIndex);

    /**
     * 描述: 获取员工的角色
     *
     * @return com.zmn.common.dto2.ResponseDTO<java.util.List < com.zmn.mcc.common.dto.role.RoleBaseDRO>>
     * @author jiafei
     * @since 2022/6/9 9:41
     */
    @ApiOperation(value = "根据更新时间获取角色员工关系", response = ResponseDTO.class)
    ResponseDTO<List<RoleBaseDRO>> listRoleByStaffId(@ApiParam(value = "员工id集合", required = true)
                                                     @NotNull(message = "员工id不能为空") Integer staffId);

    /**
     * 描述: 获取角色异动日志
     *
     * @return McRoleChangeLogDRO
     * @author xyh
     * @since 2022/6/9 9:41
     */
    @ApiOperation(value = "获取角色异动日志", response = ResponseDTO.class)
    ResponseDTO<List<McRoleChangeLogDRO>> listRoleChangeLog(@ApiParam(value = "角色异动日志请求参数", required = true)
                                                            @NotNull(message = "角色异动日志请求参数为空") McRoleChangeLogDIO dio);
}